package dungeonTools;

import java.math.BigDecimal;

import temperature.Temperature;
import dungeonElements.Rock;
import dungeonElements.Square;

/**
 * A constraint that determines whether or not a specific square is 
 * of the Rock class and has a temperature of at least 200\u00B0C.
 * 
 * @author Tom Jacobs & Ewoud De Moor
 * @version 3.0
 */
public class RockWith200TemperatureConstraint implements Constraint{

	@Override
	public boolean matchesConstraint(Square square) {
		return ((square.getClass() == Rock.class) 
				&& square.getTemperature().compareTo(new Temperature(BigDecimal.valueOf(200))) > -1);
	}
	

}
